package com.bridge.client.bridgedynamcclient.utils;

import com.bridge.client.bridgedynamcclient.bean.ChoiceItem;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

public class DataHelper {
    public static ObservableList<ChoiceItem> getMainTowerVerticalShapeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("1字式", "1"));
        items.add(new ChoiceItem("倒Y式", "2"));
        items.add(new ChoiceItem("A字式", "3"));
        return items;
    }

    public static ObservableList<ChoiceItem> getMainTowerHorizontalShapeList(){
        ObservableList<ChoiceItem> items = getMainTowerVerticalShapeList();
        items.add(new ChoiceItem("门式", "4"));
        return items;
    }

    public static ObservableList<ChoiceItem> getAuxiliaryPierNumberList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("1", "1"));
        items.add(new ChoiceItem("2", "2"));
        items.add(new ChoiceItem("3", "3"));
        items.add(new ChoiceItem("4", "4"));
        return items;
    }

    public static ObservableList<ChoiceItem> getMainSpanNumberList(String bridgeType){
       if(bridgeType.equals("1")){
           return getMainSpanNumberType1List();
       }else if(bridgeType.equals("3")){
           return getMainSpanNumberType3List();
       }

       return getMainSpanNumberType1List();
    }
    public static ObservableList<ChoiceItem> getMainSpanNumberType1List(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("1", "1"));
        items.add(new ChoiceItem("2", "2"));
        items.add(new ChoiceItem("3", "3"));
        items.add(new ChoiceItem("4", "4"));
        items.add(new ChoiceItem("5", "5"));
        items.add(new ChoiceItem("6", "6"));
        items.add(new ChoiceItem("7", "7"));
        items.add(new ChoiceItem("8", "8"));
        items.add(new ChoiceItem("9", "9"));
        items.add(new ChoiceItem("10", "10"));
        return items;
    }

    public static ObservableList<ChoiceItem> getMainSpanNumberType3List(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("2", "2"));
        items.add(new ChoiceItem("3", "3"));
        items.add(new ChoiceItem("4", "4"));
        items.add(new ChoiceItem("5", "5"));
        items.add(new ChoiceItem("6", "6"));
        items.add(new ChoiceItem("7", "7"));
        items.add(new ChoiceItem("8", "8"));
        items.add(new ChoiceItem("9", "9"));
        items.add(new ChoiceItem("10", "10"));
        return items;
    }

    public static ObservableList<ChoiceItem> getMainMaterialTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("混凝土", "1"));
        items.add(new ChoiceItem("钢", "2"));
        items.add(new ChoiceItem("组合梁", "3"));
        return items;
    }

    public static ObservableList<ChoiceItem> getSingleBeamInterfaceTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("空心板梁", "1"));
        items.add(new ChoiceItem("T梁", "2"));
        items.add(new ChoiceItem("小箱梁", "3"));
        return items;
    }

    public static ObservableList<ChoiceItem> getStiffeningGirderMaterialTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("混凝土", "1"));
        items.add(new ChoiceItem("钢", "2"));
        items.add(new ChoiceItem("混合式", "3"));
        return items;
    }

    public static ObservableList<ChoiceItem> getStiffeningGirderSectionTypeListByMaterialType(String materialType){
        return switch (materialType) {
            case "1" -> getStiffeningGirderSectionTypeListForHNT();
            case "2" -> getStiffeningGirderSectionTypeListForG();
            case "3" -> getStiffeningGirderSectionTypeListForHHS();
            default -> getStiffeningGirderSectionTypeListForG();
        };
    }
    public static ObservableList<ChoiceItem> getStiffeningGirderSectionTypeListForHNT(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("板式", "1"));
        items.add(new ChoiceItem("边箱式", "3"));
        items.add(new ChoiceItem("整体箱式", "5"));
        return items;
    }
    public static ObservableList<ChoiceItem> getStiffeningGirderSectionTypeListForG(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("边箱式", "3"));
        items.add(new ChoiceItem("分体箱式", "4"));
        items.add(new ChoiceItem("整体箱式", "5"));
        items.add(new ChoiceItem("桁架式", "6"));
        return items;
    }

    public static ObservableList<ChoiceItem> getStiffeningGirderSectionTypeListForHHS(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("多工字钢梁式", "2"));
        items.add(new ChoiceItem("边箱式", "3"));
        items.add(new ChoiceItem("分体箱式", "4"));
        items.add(new ChoiceItem("整体箱式", "5"));
        items.add(new ChoiceItem("桁架式", "6"));
        return items;
    }

    public static ObservableList<ChoiceItem> getSampleTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("连续行车测试", "0"));
        items.add(new ChoiceItem("跨中停车测试", "1"));
        return items;
    }

    public static ObservableList<ChoiceItem> getBridgeTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("梁桥", "1"));
        items.add(new ChoiceItem("斜拉桥", "3"));
        return items;
    }

    public static ObservableList<ChoiceItem> getMainBeamTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("钢箱梁", "钢箱梁"));
        items.add(new ChoiceItem("钢加劲梁", "钢桁梁"));
        items.add(new ChoiceItem("钢混组合梁", "钢混组合梁"));
        items.add(new ChoiceItem("混凝土梁", "混凝土梁"));
        return items;
    }


    public static ObservableList<ChoiceItem> getGirderTypeList(){
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("简支梁", "1"));
        items.add(new ChoiceItem("连续梁", "2"));
        return items;
    }


    public static ObservableList<ChoiceItem> getMeasureType() {
        ObservableList<ChoiceItem> items = FXCollections.observableArrayList();
        items.add(new ChoiceItem("连续行车测试", "0"));
        items.add(new ChoiceItem("跨中停车测试", "1"));
        return items;
    }
}
